// 1.引包
import React,{Component} from 'react'
import {HashRouter,Route} from 'react-router-dom'
// 相当于 import React from 'react'
// const Component = React.Component

// 引自己写的组件
import Side from './components/Side/Side.js'
import Menu from './components/Menu/Menu.js'

import DashBoard from './components/DashBoard/DashBoard.js'
import TecManage from './components/TecMange/TecMange.js'
import CateManage from './components/CateMange/CateManage.js'
import Tmp from './components/Tmp.js'
import Login from './components/Login/Login.js'
import TecEdit from './components/TecEdit/TecEdit.js'

// var obj = {a:1,b:2}
// var {a,b} = obj

// 2定义组件
// 定义组件的同时暴露组件
import  './App.less'


export default class App extends Component{
  render(){
    return (
      <HashRouter>
      <div className="app">
        <Menu></Menu>
        <Side></Side>
        <div className="main">
          { 
            // Route
          }

          <Route path="/Login" component={Login}></Route>
          <Route path="/DashBoard"   component={DashBoard}></Route>
          <Route path="/TecManage"   component={TecManage}></Route>
          <Route path="/CateManage"   component={CateManage}></Route>
          {
            // 路由参数,动态路由!
          }
          <Route path="/TecEdit/:id"   component={TecEdit}></Route>

          {
            // 如果不写path就是匹配所以情况的锚点
            // // <Route  component={Tmp}></Route>
          }
          
        </div>
      </div>
      </HashRouter>
      )
  }
}